# Main application entry point
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import utils
import handlers

application = webapp.WSGIApplication([
	('/create', handlers.CreateCountdown),
	('/expert', handlers.CreateCustomThemedCountdown),
	('/simple', handlers.CreateSimpleCustomThemedCountdown),
	('/getSafeHtml', handlers.GetSafeHtml),
	(utils.regexp["parseFullUrl"], handlers.CountDownDMYHM),
	(utils.regexp["parseFullUrlWithSeconds"], handlers.CountDownDMYHMS),
	(utils.regexp["parseOldShortUrl"], handlers.AccessViaShortUrl),
	(utils.regexp["parseb64ShortUrl"], handlers.AccessViaB64ShortUrl),
	('/.*', handlers.Index)
], debug=True)

def main():
	run_wsgi_app(application)

if __name__ == "__main__":
    main()